<template>
	<view>
		<u-sticky bgColor="#fff">
			<u-tabs :current="current?current:0" @change="change" :list="list"></u-tabs>
		</u-sticky>
	</view>
</template>

<script>
	export default {
		name: "custom-tabbar",

		data() {
			return {
				current: 0,
				list: [{
					name: '推荐',
					pagePath: 'pages/index/index'
				}, {
					name: '关注',
					pagePath: 'pages/follow/follow'
				}, {
					name: '圈子',
					pagePath: 'pages/circle/circle'
				}]
			};
		},
		methods: {
			change(e) {
				console.log(e);
				uni.switchTab({
					url: "/" + e.pagePath,
					current: e.index,
				})
			},

		}
	}
</script>

<style lang="scss">

</style>
